package com.hp.goods_service.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hp.common_api.entity.SpecGroup;
import com.hp.goods_service.mapper.SpecGroupMapper;
import com.hp.goods_service.service.ISpecGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 规格参数的分组表，每个商品分类下有多个规格参数组 服务实现类
 * </p>
 *
 * @author xray
 * @since 2021-04-23
 */
@Service
public class SpecGroupServiceImpl extends ServiceImpl<SpecGroupMapper, SpecGroup> implements ISpecGroupService {

    @Autowired
    private SpecGroupMapper specGroupMapper;

    @Override
    public List<SpecGroup> getSpecGroupsByCategoryId(Long cid) {
        return specGroupMapper.selectSpecGroupsByCategoryId(cid);
    }
}
